package com.sqx.modules.course.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "custom")
public class CustomComponent {

    @Value(value = "${custom.remoteHost}")
    private static String remoteHost;//主机
    private static int port = 22;
    @Value(value = "${custom.username}")
    private static String username;//登录用户名
    @Value(value = "${custom.password}")
    private static String password;//登录密码
    @Value(value = "${custom.domainName}")
    private static String domainName;//域名

    public static String getReadPath() {
        return readPath;
    }

    public static void setReadPath(String readPath) {
        CustomComponent.readPath = readPath;
    }

    @Value(value = "${custom.readPath}")
    private static String readPath;//远程路径

    public static String getRemoteHost() {
        return remoteHost;
    }

    public static void setRemoteHost(String remoteHost) {
        CustomComponent.remoteHost = remoteHost;
    }

    public static int getPort() {
        return port;
    }

    public static void setPort(int port) {
        CustomComponent.port = port;
    }

    public static String getUsername() {
        return username;
    }

    public static void setUsername(String username) {
        CustomComponent.username = username;
    }

    public static String getPassword() {
        return password;
    }

    public static void setPassword(String password) {
        CustomComponent.password = password;
    }

    public static String getDomainName() {
        return domainName;
    }

    public static void setDomainName(String domainName) {
        CustomComponent.domainName = domainName;
    }
}
